// 数据拼接
export function computedData(category, goods) {
	var new_goods = []
	for (var i = 0; i < category.length; i++) {
		var obj = {
			id: category[i].id,
			title: category[i].name,
			children: []
		}
		for (var j = 0; j < goods.length; j++) {
			goods[j].num = 0
			if (category[i].id == goods[j].pid) {
				obj.children.push(goods[j])
			}
		}
		new_goods.push(obj)
	}
	return new_goods
}